export const tipsConfig = {
	LOCATION: {
		title: '位置权限',
		tips: '用于获取当前位置信息、考勤打卡等场景',
		describe: '获取位置信息',
		key: 'LOCATION',
		permission:'android.permission.ACCESS_FINE_LOCATION'
	},
	CAMERA: {
		title: '相机/拍摄权限',
		tips: '用于拍照、录制视频等场景',
		describe: '拍摄照片和录制视频',
		key: 'CAMERA',
		permission:'android.permission.CAMERA'
	},
	CAMERA_STORAGE: {
		title: '相机/拍摄/存储空间权限',
		tips: '用于拍照、上传照片等场景',
		describe: '拍摄照片、上传照片',
		key: 'STORAGE',
		permission:'android.permission.CAMERA'
	},
	CAMERA_VIDEO_STORAGE: {
		title: '相机/拍摄/存储空间权限',
		tips: '用于拍摄视频、上传视频等场景',
		describe: '拍摄视频、上传视频',
		key: 'STORAGE',
		permission:'android.permission.CAMERA'
	},
	STORAGE: {
		title: '存储空间/照片权限',
		tips: '用于上传文件、上传照片和视频等场景',
		describe: '上传文件和照片、视频',
		key: 'STORAGE',
		permission:'android.permission.READ_EXTERNAL_STORAGE'
	},
	RECORD_AUDIO: {
		title: '麦克风权限',
		tips: '用于发送语音等场景',
		describe: '录制音频',
		key: 'RECORD_AUDIO',
		permission:'android.permission.RECORD_AUDIO'
	},
	CALL_PHONE: {
		title: '拨打电话权限',
		tips: '用于拨打电话等场景',
		describe: '拨打电话',
		key: 'CALL_PHONE',
		permission:'android.permission.CALL_PHONE'
	}
}
export const clearPermissionStorageKey = (key,err,callback) => {
	if(err?.errMsg?.includes('No Permission')){
		const permission = uni.getStorageSync('permission') || {}
		if(permission[key] == 1){
			delete permission[key]
			uni.setStorageSync('permission',permission)
			callback && callback()
		}
	}
}